﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Imgur.Net.Auth
{
    /// <summary>
    /// Defines the signature of a class which is used to add authentication credentials to an Imgur web request. 
    /// </summary>
    public interface ImgurAuthContext
    {
        /// <summary>
        /// The type of authentication context this is. Typically either anonymous or that of a registered Imgur user.
        /// </summary>
        AuthContextType ContextType { get; }

        /// <summary>
        /// Modifies the given WebRequest object to contain required tokens used by Imgur to autheticate users.
        /// </summary>
        /// <remarks>
        /// Typically implementations of this interface will add a series of either headers or parameters to a web request which contain 
        /// the tokens that Imgur uses to authenticate requests. For example an anonymous request may be required to add a header such as
        /// <example>
        ///     Authentication: Client-ID &lt;client ID Token&gt;
        /// </example>
        /// </remarks>
        /// <param name="req">The web request to modify.</param>
        void AddContextToRequest(ref WebRequest req);

        RegistrationTokenContext RegistrationContext { get; }
    }
}
